#ifndef __GRAVEFACTORY_H__
#define __GRAVEFACTORY_H__

#include "GameGlobal.h"
#include "RectLayout.h"
#include "Zombie.h"

class GraveFactory : CCObject
{
private:
	static	const int		ZOMBIE_MAX_COUNT = 100;
	static	const int		ZOMBIE_COUNT_PER_RUSH = 10;

	static	const float		CREATE_INTERVAL;

	static	GraveFactory*	m_GraveFactory;

	unsigned int			m_currentCreatedNum;
	CCPoint					m_startPoint;
	CCPoint					m_endPoint;

	GraveFactory(CCPoint startPoint,CCPoint endPoint):
	m_startPoint(startPoint),m_endPoint(endPoint),m_currentCreatedNum(0){}

public:
	static GraveFactory*	Create(CCPoint startPoint,CCPoint endPoint);
	static void				Destory();

	unsigned int			CurrentNum(){ return m_currentCreatedNum; };
	Zombie*					CreateZombie();
};

#endif